/*u09322p9:02
 #make a c excercizer for the euqt lib, doublecheck wrapable


 extern "C"
 */
#include <stdio.h>
#include <stdlib.h>

#include "euqt.h"


int main(int argc, char **argv)
{
	QApplication *q = qt_init(argc, argv);
	QFile fi("test.ui");
	QWidget *win, *combo;

      if(fi.exists())
    {
        fi.open(QFile::ReadOnly);
        QString Ui = QLatin1String(fi.readAll());
        win = qt_loadUi(Ui.toLatin1().data(), (QWidget *)0);
    }
    else
    {
	qDebug() << qApp->tr("failed to open %1");   //.arg(fi);
      
      return 207;
    }



        combo = qt_findChild(win, "comboBox", "");


	qDebug() << qApp->tr("result combo getProps %1").arg(qt_getProps(combo));
	qDebug() << qApp->tr("ok combo\n");
	qDebug() << qApp->tr("result win getProps  %1").arg(qt_getProps(win));
	qDebug() << qApp->tr("ok win\n");


	if (0)
	{
		char *qt_get = QFileDialog::getOpenFileName(0
					   , "", ".", "", 0
					   , (QFileDialog::Options) 0).toLatin1().data();
		printf("qt_get file={%s}", qt_get);
	}

	//~ qt_show(QWidget *w);

	return qt_run(q);  //0?
}

